import request from '@/utils/request'

// 查询教师基本信息列表
export function listPerson(query) {
  return request({
    url: '/teacher/person/list',
    method: 'get',
    params: query
  })
}

// 通过A00查询教师基本信息列表--用于本人信息列表展示
export function selectListByA00(A00) {
  return request({
    url: '/teacher/person/selectListByA00?A00=' + A00,
    method: 'get',
  })
}

// 查询指定部门下的教师列表
export function listTeacherByDeptIds(deptId,query) {
  return request({
    url: '/teacher/person/' + deptId,
    method: 'post',
    params: query
  })
}

// 查询教师基本信息详细
export function getPerson(a00) {
  return request({
    url: '/teacher/person/' + a00,
    method: 'get'
  })
}

// 查询教师基本信息详细
export function getTeacherInfo(A00) {
  return request({
    url: '/teacher/person/getTeacherInfoByA00?A00=' + A00,
    method: 'get'
  })
}

// 查询教师基本信息详细
export function getInfoByUserId(userId) {
  return request({
    url: '/teacher/person/getTeacherInfo?userId=' + userId,
    method: 'get'
  })
}

// 通过A00查询教师的学历学位信息
export function selectDegreeByA00(A00) {
  return request({
    url: '/teacher/person/selectDegreeByA00?A00=' + A00,
    method: 'get'
  })
}

// 通过A00查询教师的工作信息
export function selectWorkInfoByA00(A00) {
  return request({
    url: '/teacher/person/selectWorkInfoByA00?A00=' + A00,
    method: 'get'
  })
}

// 通过A00查询教师的职称信息
export function selectTitleByA00(A00) {
  return request({
    url: '/teacher/person/selectTitleByA00?A00=' + A00,
    method: 'get'
  })
}

// 通过A00查询教师的培训信息
export function selectTrainByA00(A00) {
  return request({
    url: '/teacher/person/selectTrainByA00?A00=' + A00,
    method: 'get'
  })
}

// 通过A00查询教师的考核信息
export function selectAssessmentByA00(A00) {
  return request({
    url: '/teacher/person/selectAssessmentByA00?A00=' + A00,
    method: 'get'
  })
}

// 通过A00查询教师的档案信息
export function selectFileByA00(A00) {
  return request({
    url: '/teacher/person/selectFileByA00?A00=' + A00,
    method: 'get'
  })
}

// 通过A00查询教师的附件材料
export function selectAppendixByA00(A00) {
  return request({
    url: '/teacher/person/selectAppendixByA00?A00=' + A00,
    method: 'get'
  })
}

// 新增教师基本信息
export function addPerson(data) {
  return request({
    url: '/teacher/person',
    method: 'post',
    data: data
  })
}

// 修改教师基本信息
export function updatePerson(data) {
  return request({
    url: '/teacher/person',
    method: 'put',
    data: data
  })
}

// 删除教师基本信息
export function delPerson(a00) {
  return request({
    url: '/teacher/person/' + a00,
    method: 'delete'
  })
}

// 导出教师基本信息
export function exportPerson(query) {
  return request({
    url: '/teacher/person/export',
    method: 'get',
    params: query
  })
}

// 导出教师个人基本信息
export function exportSelf(A00) {
  return request({
    url: '/teacher/person/exportSelf?A00=' + A00,
    method: 'get'
  })
}
